<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function unique(arr) {
            const res = []
            arr.forEach( item => {
                if( res.indexOf(item)<0 ){
                    res.push(item)
                }
            })
            return res
        }

        function unique(arr) {
            var set = new Set(arr)
            return [...set]
        }
    </script>
</body>
</html>